<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<title>${appname}-<c:if test="${!empty sessionScope._local_node_session}">${sessionScope._local_node_session.nodeName}-</c:if>${si:ctname("NET_TYPE",sessionScope._netType)}</title>
<%@ include file="/WEB-INF/view/common/css_js_base.jsp"%>
<script type="text/javascript">
function deleteById(id){
	ui.confirm('确认删除?',function(){
		$.ajax({
			   type: "POST",
			   dataType:"json",
			   cache: false,
			   url: _ctx + "/registry/sys_delete.do",
			   data: {id:id},
			   success: function(resp){
				   if(resp.status == '1'){
					   ui.msg(resp.msg, 1);
				   }else{
					   ui.msg(resp.msg, 0);
				   }
			   },
			   error:function(){
				   ui.msg('信息加载错误', 0);
			   }
		});
	});	
}
</script>
</head>
<body>
<%@ include file="/WEB-INF/view/common/navbar.jsp"%>
<div class="container">
	<div class="row">
		<div class="col-md-12">
			<div class="panel panel-default">
				  <div class="panel-heading">
				        服务注册
				  </div>
				  <div class="panel-body">
				  	<div class="row">
				  		<div class="col-md-8">
						  	<form class="form-inline" role="form">
							  <div class="form-group">
							    <label class="control-label">服务编码</label>
							    <input type="text" class="form-control input-sm"/>
							  </div>
							  <div class="form-group">
							    <label class="control-label">服务名称</label>
							    <input type="text" class="form-control input-sm"/>
							  </div>
							   <div class="form-group">
							    <label class="control-label">&nbsp;</label>
							    <a href="#" class="btn btn-primary btn-sm btn-search">查找</a>
							  </div>
							</form>
						</div>
						<div class="col-md-4 text-right">
							<a class="btn btn-primary btn-sm btn-add" href="${ctx}/registry/sys_add.do">新增</a>
							<a class="btn btn-warning btn-sm btn-delete" href="javascript:void()">批量删除</a>
						</div>
					</div>
				  	<hr/>
					<table class="table table-striped table-hover">
						<thead>
				        <tr>
							<th><input type="checkbox"/></th>
							<th>系统编码</th>
							<th>系统名称</th>
							<th>所属系统</th>
							<th>备注</th>
							<th>操作</th>
				        </tr>
					    </thead>
						<tbody>
						<c:forEach var="vo" items="${_data}">
						  <tr>
							<td><input type="checkbox"/></td>
							<td>${vo.code}</td>
							<td>${vo.name}</td>
							<td>${vo.sysName}</td>
							<td>${vo.note}</td>
							<td>
								<a class="btn btn-primary btn-sm btn-view" href="${ctx}/registry/service.do?id=${vo.id}">查看</a>
								<a class="btn btn-primary btn-sm btn-edit" href="javascript:todo();">修改</a>
								<a class="btn btn-primary btn-sm btn-delete" href="javascript:void(0);" onclick="deleteById('111')">删除</a>
							</td>
						  </tr>
						</c:forEach>
						</tbody>
					</table>
				    <%@ include file="/WEB-INF/view/common/pg1.jsp"%>
				  </div>
			</div>
		</div>
	</div>
</div>
<%@ include file="/WEB-INF/view/common/footer.jsp"%>
</body>
</html>
